-
-
Notifications
You must be signed in to change notification settings - Fork 264
feat(data-table): pass row to display function
#1810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(data-table): pass row to display function
#1810
Conversation
metonym
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the time – I think this is a valuable change.
The docs/types are auto-generated.
Can you update the JSDoc types in DataTable.svelte (Lines 5, 6, 10) and run yarn build:docs?
4415117 to
54d8278
Compare
According to the docs, only line 10 needs update: the "display" method receives the row object only for cells, not headers, am I right? Just rebased & pushed an update |
|
I believe that the When testing the types, I see this: Repro: try using
|
54d8278 to
2966387
Compare
|
I don't see a reason to make this change on headers: This means two things:
I think we should change the behavior for that. I just pushed a fix to add I'm not sure the rest of the PR is okay, feel free to make more comments 👌 |
2966387 to
07852fc
Compare
row to display function
|
Thank you @metonym ! |
|
Released in v0.81.0 |

This will allow
displayusage to use the whole object for use with computed values, or when needing multiple fields to show more than one element (like "item actions" that might need more than one field, for instance).